<template>
    <div class="UserLogin">
        <header class="mui-bar mui-bar-nav">
            <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
            <h1 class="mui-title">用户登录</h1>
        </header>
        <div class="Loginone">
            <img class="srcshouji" src="../../img/My/手机号.png" alt=""><input type="text" placeholder="请输入账号" v-model=user><img class="shanchu1" src="../../img/My/shangchu.png" alt="" >
        </div>
        <div class="Loginone pass">
            <img class="srcshouji" src="../../img/My/密码.png" alt=""><input type="password" placeholder="请输入密码" v-model=passwed><img class="shanchu1 shanchu2" src="../../img/My/shangchu.png" alt="">
        </div>
        <div class="denglu" @click="dengru">
            登录
        </div>
        <div class="foot1">
            <span class="liji">立即注册</span>
            <span class="wangji">忘记密码</span>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
           user:"",
           passwed:"",
        };
    },
       methods: {
        dengru:function(){
                  this.$http
                .post(
                    "api/user/login",
                    {
                        'account': this.user,
                        'password': this.passwed
                    },
                    { emulateJSON: true }
                ).then((data)=>{
                        console.log(data)
                })
 }
}
}
</script>
<style  lang="scss" scoped>
.UserLogin {
    width: 100%;
    background: #fff;
    height: 100%;
    header {
        background: #d51313;
        a {
            color: #fff;
        }
        .mui-title {
            color: #fff;
        }
    }

    .Loginone {
        padding-top: 2.05rem;
        width: 87%;
        margin: 0 auto;
        position: relative;
        .srcshouji {
            width: 0.52rem;
            height: 0.52rem;
            margin-right: 0.22rem;
            position: relative;
            top: 0.3rem;
        }
        input {
            width: 5.42rem;
            border: none;
            border-bottom: 1px solid #dedede;
            padding-bottom: 0;
            font-size: 0.28rem;
        }
        .shanchu1 {
            width: 0.28rem;
            position: absolute;
            top: 2.5rem;
            left: 5.8rem;
        }
        .shanchu2 {
            top: 0.7rem;
        }
    }
    .pass {
        padding-top: 0.3rem;
        padding-bottom: 1.12rem;
    }
    .denglu {
        background: #d51313;
        width: 90%;
        margin: 0 auto;
        text-align: center;
        height: 0.88rem;
        line-height: 0.88rem;
        color: #fff;
        border-radius: 10px;
    }
    .foot1 {
        width: 90%;
        margin: 0 auto;
        text-align: center;
        padding-top: 1rem;
        font-size: 0.26rem;
    }
    .liji {
        color: #d51313;
    }
    .wangji {
        margin-left: 0.2rem;
    }
}
</style>

